﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace RealEstate.Models
{
    public partial class Property
    {
        public string SubjectProperty
        {
            get
            {
                if (!string.IsNullOrEmpty(StreetNumer) && !string.IsNullOrEmpty(StreetName))
                {
                    return string.Concat(StreetNumer, " ", StreetName);
                }
                else if (!string.IsNullOrEmpty(StreetNumer))
                {
                    return StreetNumer;
                }
                else if (!string.IsNullOrEmpty(StreetName))
                {
                    return StreetName;
                }

                return null;
            }
        }
    }
}